1. Field of the Invention
The present invention relates to a moving image decoding apparatus which receives and decodes coded data, and a moving image coding apparatus which codes image data and transmits coded data. More particularly, it relates to a moving image decoding apparatus which temporarily starts decoding coded data transmitted thereto and decodes the coded data again when they become complete, and replaces the previously-decoded data with the newly-decoded data in a case where an error occurs in the coded data transmitted thereto, some data are missing from the coded data, or there occur fluctuations in the transmission time of the coded data in a transmission line, and therefore some of all the coded data are not transmitted thereto at the time when it has to complete the reception of the coded data required and to start decoding the coded data at a predetermined timing in order to perform display of the decoded data normally, thereby reducing the degradation in the image quality which is caused by the decoding of subsequent coded data, and a moving image coding apparatus which is suited to the moving image decoding apparatus.
2. Description of Related Art
When decoding coded data received via a network, such as the Internet, related art moving image decoding apparatus need to take into consideration mixture of an error into the coded data, and a data loss from the coded data, change in the sequence of the coded data, etc. Therefore, related art moving image decoding apparatus carry out processes of, for example, temporarily buffering the coded data before decoding them, when an error occurs in the coded data or some data are missing from the coded data, making a request of the transmit side for retransmission of the coded data, or, when there is a change in the sequence of the coded data which have reached, rearranging the coded data into normal sequence using a buffer of the receive side.
Although TCP (Transmission Control Protocol) is used as a protocol for enabling related art moving image decoding apparatus to carry out such processes, it is unsuitable for uses, such as transmission of moving images in real time since the time of arrival of retransmitted packets is not guaranteed. On the other hand, while the immediacy is secured using protocols, such as RTP (Real-time Transport Protocol) and UDP (User Datagram Protocol), the transmit side adds an error correction code to each coded data instead of performing control of retransmission of coded data having a loss or error.
The receive side can deal with fluctuations in the timing of arrival of coded data and change in the sequence of the coded data by buffering them. However, in general, the receive side cannot buffer coded data for a long time in reception of a moving image in real time since the buffering time is added to a delay which occurs between the transmission of the coded data at the transmit side and the playback of the coded data.
As a method of solving the problem, there has been provided a receiving/decoding system for receiving and decoding video packets disclosed in, for example, patent reference 1. When an error or data loss occurs in received coded data, the receiving/decoding system decodes the coded data continuously and also stores subsequent coded data temporarily. After that, when the coded data, which has been transmitted with an error or data loss occurring, are retransmitted to the receiving/decoding system which has made a request for retransmission of the coded data, the receiving/decoding system reads the above-mentioned coded data stored temporarily therein and redecodes the coded data. The decoder of the receiving/decoding system holds its decoding state at that time so that it can restart decoding coded data starting from the above-mentioned coded data in which an error or data loss has occurred. When restarting decoding coded data starting from the above-mentioned coded data, the decoder returns to the decoding state in which it can redecode all coded data which have been received after the coded data having an error or data was received.
[Patent reference 1] JP,2002-247578,A (see paragraph 0015)
Since the receiving/decoding system disclosed in above-mentioned patent reference 1, which is provided as a related art moving image decoding apparatus, goes back in time to the time when coded data having an error or data loss was received from the time when correct coded data corresponding to the coded data having an error or data loss is received so as to redecode all coded data which the receiving/decoding system has received since the time when the coded data having an error or data loss was received, a larger-than-usual amount of computations is performed. Therefore, a problem is that when the related art moving image decoding apparatus cannot decode inputted coded data about a moving image at a high speed because of the processing capability of the decoder, the related art moving image decoding apparatus cannot carry out the process of receiving and decoding coded data at a predetermined timing and therefore the display of the moving image is disturbed.
Another problem is that when a long delay time is introduced into transmission of coded data by the transmission line, and it takes several frame times for correct coded data which is transmitted in response to, for example, a request for retransmission of the coded data to reach the related art moving image decoding apparatus, even when the correct coded data is received in the meantime, a large buffer for storing all the received data and a high-speed decoder which can decode the correct coded data at a high speed so as to offset the delay of several frame times long are needed.
The above-mentioned reference does not present any clear standard about the storage time of the buffer and the processing capability of the decoder which make it possible for the related art moving image decoding apparatus to carry out the process of receiving and decoding coded data at a predetermined timing, and only discloses an ambiguous idea showing that the speeding up of the process of receiving and decoding coded data makes it possible for the related art moving image decoding apparatus to carry out the process at the predetermined timing.